const mongoose=require('mongoose');
const mongoosePaginate=require('mongoose-paginate');
mongoose.connect('mongodb://localhost/xiao');
var schema=new mongoose.Schema({
    productname:String,
    collections:Number,
    like:Number,
    class:Array,//所属类别
    price:Number,
    date:String,//上架日期
    postage:String,
    suit:Array
});
schema.plugin(mongoosePaginate);
const Product =mongoose.model('Product',schema);
module.exports=Product;